package cn.wolfcode.domain;


import com.alibaba.fastjson.JSON;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Controller;

import java.util.HashMap;
import java.util.Map;

/**
 * 部门
 */
@Getter
@Setter
@ToString
public class Department {
    private Long id;        // id 主键
    private String name;    // 部门名称
    private String sn;      // 部门缩写

    public String getJson(){
		Map<Object, Object> map = new HashMap<>();
		map.put("id",id);
		map.put("name",name);
		map.put("sn",sn);
		return JSON.toJSONString(map);
	}
}